package com.hmsproject.datastructures.comparators;

import java.util.Comparator;

import com.hmsproject.datastructures.Hotel;

public class HotelPriceComparatorAscending implements Comparator<Hotel> {
	
	private static HotelPriceComparatorAscending hotelPriceComparatorAscending = new HotelPriceComparatorAscending();

	@Override
	public int compare(Hotel hotel1, Hotel hotel2) {
		return hotel1.getPrice()-hotel2.getPrice();
	}
	
	private HotelPriceComparatorAscending(){
		
	}
	
	public static HotelPriceComparatorAscending getInstance(){
		return hotelPriceComparatorAscending;
	}

}
